import {
	get,
	post
} from "./request.js"

import request from '@/utils/request'

// 获取借阅记录
export function getBorrowList(data) {
	return get("/book/lend/getLendMessage", data)
}

// 获取图书
export function getBook(data) {
	return get("/bookManage/selectBookById", data)
}
// 借阅图书
export function BookLend(query) {
	return request({
		url: '/book/lend/lendBook',
		method: 'post',
		data: query,
	})
}

export function returnBook(data) {
	return post("/book/lend/returnBook", data)
}

export function continueBook(data) {
	return post("/book/lend/renewBook", data)
}

export function rateAvg(data) {
	return get("/system/rate/getAvg", data)
}